package com.mission.schedule.activity;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;

import com.daimajia.slider.library.SliderLayout;
import com.daimajia.slider.library.SliderTypes.BaseSliderView;
import com.daimajia.slider.library.SliderTypes.TextSliderView1;
import com.google.gson.Gson;
import com.lcf.refreshlibrary.PullToRefreshBase;
import com.lcf.refreshlibrary.PullToRefreshScrollView;
import com.lidroid.xutils.HttpUtils;
import com.lidroid.xutils.exception.HttpException;
import com.lidroid.xutils.http.RequestParams;
import com.lidroid.xutils.http.ResponseInfo;
import com.lidroid.xutils.http.callback.RequestCallBack;
import com.lidroid.xutils.http.client.HttpRequest.HttpMethod;
import com.mission.schedule.R;
import com.mission.schedule.constants.FristFragment;
import com.mission.schedule.constants.ShareFile;
import com.mission.schedule.constants.URLConstants;
import com.mission.schedule.utils.DateUtil;
import com.mission.schedule.utils.ListViewForScrollView;
import com.mission.schedule.utils.SharedPrefUtil;
import com.mission.schedule.utils.StringUtils;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import de.greenrobot.event.EventBus;

/**
 * Created by liwei on 2017/10/20.
 */

public class FaxianActivity extends BaseActivity implements View.OnClickListener  {

    TextView more1, more2, more3;
    TextView myshareqd,tucao;
    LinearLayout top_ll_back;

    private boolean isShow = false;
    Context context;
    public static LinearLayout top_ll_left;
    SharedPrefUtil sharedPrefUtil = null;
    String userID;
    LinearLayout wu_note_share;

    PullToRefreshScrollView mPullRefreshScrollView;
    LinearLayout headviewadd;
    private SliderLayout mySlider1;
    private SliderLayout mySlider2;
    View headview, headviewother;
    ListViewForScrollView listview1, listview2, listview3;


    List<PubicBytitle.ListBean> publicByTitleList = new ArrayList<>();
    List<PubicBytitle.ListBean> pubicByNewList = new ArrayList<>();
    List<PubicBytitle.ListBean> pubicByPushList = new ArrayList<>();
    List<PublicByUid.PageBean.ItemsBean> pubicByUidList = new ArrayList<>();

    ListAdpater ByNewLlistApater;
    ListAdpater ByPushlistApater;
    ListAdpater2 ByUidlistApater;
    
    @Override
    protected void setListener() {

    }

    @Override
    protected void setContentView() {
        setContentView(R.layout.new_fragment_myfound);
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        mPullRefreshScrollView = (PullToRefreshScrollView) findViewById(R.id.pull_refresh_scrollview);
        mPullRefreshScrollView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ScrollView>() {


            @Override
            public void onPullDownToRefresh(
                    PullToRefreshBase<ScrollView> refreshView) {
                loaddata();
            }

            @Override
            public void onPullUpToRefresh(
                    PullToRefreshBase<ScrollView> refreshView) {
                mPullRefreshScrollView.onRefreshComplete();
            }
        });
        init();

        loadlocal();
        loaddata();
        mPullRefreshScrollView.post(new Runnable() {
            @Override
            public void run() {
                mPullRefreshScrollView.scrollTo(0, 0);
            }
        });
        headviewadd.setFocusable(true);
        headviewadd.setFocusableInTouchMode(true);
        headviewadd.requestFocus();
        findViewById(R.id.top_ll_back).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
    @Override
    public void onClick(View v) {
        Intent intent = new Intent(this, QDFXDetailListActivity.class);
        switch (v.getId()) {
            case R.id.more1:
                intent.putExtra("flag", 0);
                startActivityForResult(intent, 100);
                break;
            case R.id.more2:
                intent.putExtra("flag", 1);
                startActivityForResult(intent, 100);
                break;
            case R.id.more3:
                intent.putExtra("flag", 2);
                startActivityForResult(intent, 100);
                break;
            case R.id.tucao:
                Intent sintent = new Intent(context, QDFXDetailActivity.class);
                sintent.putExtra("type", 0);
                sintent.putExtra("title", "时间表“吐槽”专区");
                sintent.putExtra("titleId", "20170720155500859804");
                sintent.putExtra("path", "20170720/725219.png");
                sintent.putExtra("goodNum", "0");
                sintent.putExtra("redNum", "1");
                sintent.putExtra("name", "安卓版意见反馈");
                sintent.putExtra("time", "2017-07-25 13:42:41");
                sintent.putExtra("num", "1");
                sintent.putExtra("uid", "5001");
                sintent.putExtra("stylee", 2);
                startActivity(sintent);
                break;
        }
    }

    private void init() {
        EventBus.getDefault().register(this);
        context = this;
        top_ll_left = (LinearLayout) findViewById(R.id.top_ll_left);
        sharedPrefUtil = new SharedPrefUtil(context, ShareFile.USERFILE);
        userID = sharedPrefUtil.getString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.USERID, "");
        headviewadd = (LinearLayout) findViewById(R.id.new_fragment_myfound_headview);
        wu_note_share = (LinearLayout) findViewById(R.id.wu_note_share);
        DisplayMetrics metric = new DisplayMetrics();
        FaxianActivity.this.getWindowManager().getDefaultDisplay().getMetrics(metric);
        LinearLayout.LayoutParams linearParams = (LinearLayout.LayoutParams) headviewadd.getLayoutParams();
        linearParams.height = mScreenWidth * 7 / 10;// 当控件的高强制设成屏幕3/5象素
        linearParams.width = mScreenWidth;
        headviewadd.setLayoutParams(linearParams);
        headview = LayoutInflater.from(FaxianActivity.this).inflate(R.layout.new_fragment_myfound_headview_slider, null);
        headviewother = LayoutInflater.from(FaxianActivity.this).inflate(R.layout.new_fragment_myfound_headview_slider, null);
        mySlider1 = (SliderLayout) headview.findViewById(R.id.slider);
        mySlider2 = (SliderLayout) headviewother.findViewById(R.id.slider);

        listview1 = (ListViewForScrollView) findViewById(R.id.listview1);
        listview2 = (ListViewForScrollView) findViewById(R.id.listview2);
        listview3 = (ListViewForScrollView) findViewById(R.id.listview3);
        more1 = (TextView) findViewById(R.id.more1);
        more2 = (TextView) findViewById(R.id.more2);
        more3 = (TextView) findViewById(R.id.more3);
        myshareqd = (TextView) findViewById(R.id.myshareqd);
        tucao = (TextView) findViewById(R.id.tucao);
        more1.setOnClickListener(this);
        more2.setOnClickListener(this);
        more3.setOnClickListener(this);
        myshareqd.setOnClickListener(this);
        tucao.setOnClickListener(this);

        listview1.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                selectNoteTitleid = pubicByNewList.get(position).titleId;
                selectType = 1;
                Intent intent = new Intent(context, QDFXDetailActivity.class);
                intent.putExtra("title", pubicByNewList.get(position).titles);
                intent.putExtra("titleId", pubicByNewList.get(position).titleId);
                intent.putExtra("path", pubicByNewList.get(position).imgPath);
                intent.putExtra("goodNum", pubicByNewList.get(position).goodNum + "");
                intent.putExtra("redNum", pubicByNewList.get(position).redNum + "");
                intent.putExtra("name", pubicByNewList.get(position).uname);
                intent.putExtra("time", pubicByNewList.get(position).createTime);
                intent.putExtra("num", pubicByNewList.get(position).num + "");
                intent.putExtra("uid", pubicByNewList.get(position).uid + "");
                intent.putExtra("stylee", pubicByNewList.get(position).style);
                intent.putExtra("type", 5);
                startActivityForResult(intent, 109);
            }
        });
        listview2.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                selectNoteTitleid = pubicByPushList.get(position).titleId;
                selectType = 2;
                Intent intent = new Intent(context, QDFXDetailActivity.class);
                intent.putExtra("title", pubicByPushList.get(position).titles);
                intent.putExtra("titleId", pubicByPushList.get(position).titleId);
                intent.putExtra("path", pubicByPushList.get(position).imgPath);
                intent.putExtra("goodNum", pubicByPushList.get(position).goodNum + "");
                intent.putExtra("redNum", pubicByPushList.get(position).redNum + "");
                intent.putExtra("name", pubicByPushList.get(position).uname);
                intent.putExtra("time", pubicByPushList.get(position).createTime);
                intent.putExtra("num", pubicByPushList.get(position).num + "");
                intent.putExtra("uid", pubicByPushList.get(position).uid + "");
                intent.putExtra("stylee", pubicByPushList.get(position).style);
                intent.putExtra("type", 5);
                startActivityForResult(intent, 109);
            }
        });
        listview3.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                selectNoteTitleid = pubicByUidList.get(position).titleId;
                selectType = 3;
                Intent intent = new Intent(context, QDFXDetailActivity.class);
                intent.putExtra("title", pubicByUidList.get(position).titles);
                intent.putExtra("titleId", pubicByUidList.get(position).titleId);
                intent.putExtra("path", pubicByUidList.get(position).imgPath);
                intent.putExtra("goodNum", pubicByUidList.get(position).goodNum + "");
                intent.putExtra("redNum", pubicByUidList.get(position).redNum + "");
                intent.putExtra("name", pubicByUidList.get(position).uname);
                intent.putExtra("time", pubicByUidList.get(position).createTime);
                intent.putExtra("num", pubicByUidList.get(position).num + "");
                intent.putExtra("uid", pubicByUidList.get(position).uid + "");
                intent.putExtra("stylee", pubicByUidList.get(position).style);
                intent.putExtra("type", 5);
                startActivityForResult(intent, 109);
            }
        });

    }

    public void Viewpager() {
        try {
            if (publicByTitleList == null || publicByTitleList.size() == 0) {
                headviewadd.removeAllViews();
                HashMap<String, Integer> url_maps_null = new HashMap<String, Integer>();
                url_maps_null.put("time3", R.mipmap.av);
                TextSliderView1 textSliderView = new TextSliderView1(FaxianActivity.this);
                textSliderView.setScaleType(BaseSliderView.ScaleType.Fit)
                        .image(R.mipmap.av)
                        .setOnSliderClickListener(new BaseSliderView.OnSliderClickListener() {

                            @Override
                            public void onSliderClick(BaseSliderView slider) {
                            }
                        });

                textSliderView.getBundle().putString("extra", "");
                mySlider1.addSlider(textSliderView);
                mySlider1.setPresetTransformer(SliderLayout.Transformer.Accordion);
                mySlider1.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
                mySlider1.setDuration(4000);
                headviewadd.addView(headview);
            } else {
                headviewadd.removeAllViews();
                List<PubicBytitle.ListBean> mylist = new ArrayList<>();
                mylist.clear();
                if (publicByTitleList != null && publicByTitleList.size() > 4) {
                    Collections.shuffle(publicByTitleList);
                    for (int i = 0; i < 4; i++) {
                        mylist.add(publicByTitleList.get(i));
                    }
                } else {
                    mylist = publicByTitleList;
                }
                for (final PubicBytitle.ListBean been : mylist) {
                    long betweenday;
                    if ("".equals(StringUtils.getIsStringEqulesNull(been.createTime))) {
                        betweenday = 1;
                    } else {
                        betweenday = (DateUtil.parseDate(been.createTime.substring(0, 10)).getTime()
                                - DateUtil.parseDate(DateUtil.formatDate(new Date())).getTime()) / (1000 * 3600 * 24);
                    }
                    if (betweenday != 0) {
                        TextSliderView1 textSliderView = new TextSliderView1(FaxianActivity.this);
                        Bundle sliderBundle = new Bundle();
                        sliderBundle.putSerializable("avbean", been.createTime.substring(0, 10));
                        textSliderView.getBundle().putBundle("extra", sliderBundle);
                        textSliderView.description(been.titles)
                                .setScaleType(BaseSliderView.ScaleType.Fit)
                                .image(URLConstants.图片 + been.imgPath + "&imageType=15&imageSizeType=1")
                                .setOnSliderClickListener(new BaseSliderView.OnSliderClickListener() {

                                    @Override
                                    public void onSliderClick(BaseSliderView slider) {
                                        selectType = 0;
                                        selectNoteTitleid = been.titleId;
                                        Intent intent = new Intent(context, QDFXDetailActivity.class);
                                        intent.putExtra("title", been.titles);
                                        intent.putExtra("titleId", been.titleId);
                                        intent.putExtra("path", been.imgPath);
                                        intent.putExtra("goodNum", been.goodNum + "");
                                        intent.putExtra("redNum", been.redNum + "");
                                        intent.putExtra("name", been.uname);
                                        intent.putExtra("time", been.createTime);
                                        intent.putExtra("num", been.num + "");
                                        intent.putExtra("uid", been.uid + "");
                                        intent.putExtra("stylee", been.style);
                                        intent.putExtra("type", 5);
                                        startActivityForResult(intent, 109);
                                    }
                                });

                        mySlider2.addSlider(textSliderView);
                    }
                }
                mySlider2.setPresetTransformer(SliderLayout.Transformer.Accordion);
                mySlider2.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
                mySlider2.setDuration(4000);
                headviewadd.addView(headviewother);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    private Handler hander = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            switch (msg.what) {
                case 1:
                    try {
                        ByNewLlistApater = new ListAdpater(pubicByNewList, 0);
                        if (ByNewLlistApater != null) {
                            listview1.setAdapter(ByNewLlistApater);
                            ByNewLlistApater.notifyDataSetChanged();
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    break;
                case 2:
                    try {
                        ByPushlistApater = new ListAdpater(pubicByPushList, 1);
                        if (ByPushlistApater != null) {
                            listview2.setAdapter(ByPushlistApater);
                            ByPushlistApater.notifyDataSetChanged();
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    mPullRefreshScrollView.onRefreshComplete();
                    break;
                case 3:
                    try {
                        myshareqd.setText("我分享的清单(" + (pubicByUidList == null ? 0 : pubicByUidList.size()) + ")");
                        if (pubicByUidList != null) {
                            ByUidlistApater = new ListAdpater2(pubicByUidList);
                            if (ByUidlistApater != null) {
                                listview3.setAdapter(ByUidlistApater);
                                ByUidlistApater.notifyDataSetChanged();
                            }
                        }
                        if (pubicByUidList.size() > 0) {
                            more3.setVisibility(View.VISIBLE);
                            wu_note_share.setVisibility(View.GONE);
                        } else {
                            wu_note_share.setVisibility(View.VISIBLE);
                            more3.setVisibility(View.GONE);
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    break;
                default:
                    mPullRefreshScrollView.onRefreshComplete();
                    break;
            }
        }
    };

    private void send(int what) {
        Message message = new Message();
        message.what = what;
        hander.sendMessage(message);
    }


    public void onEventMainThread(FristFragment event) {

        String msg = event.getMsg();
        if ("0".equals(msg) && isShow) {
            loadlocal();
            loaddata();
            new Handler().post(new Runnable() {
                @Override
                public void run() {
                    mPullRefreshScrollView.scrollTo(0, 0);
                }
            });
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        EventBus.getDefault().unregister(this);
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    private void setList(PubicBytitle pubicBytitle, List<PubicBytitle.ListBean> list, int goodnum, String ShareFileType) {
        if (pubicBytitle != null) {
            if (pubicBytitle.status == 0) {
                list.clear();
                list = pubicBytitle.list;
                if (list.size() > 0) {
                    for (PubicBytitle.ListBean bean : list) {
                        if (bean.titleId.equals(selectNoteTitleid)) {
                            bean.redNum = bean.redNum + 1;
                            bean.goodNum = bean.goodNum + goodnum;
                            break;
                        }
                    }
                }
            }
        }
        JSONArray jsonArray = new JSONArray();
        for (PubicBytitle.ListBean bean : list) {
            JSONObject j = new JSONObject();
            try {
                j.put("changeTime", bean.changeTime);
                j.put("contents", bean.contents);
                j.put("cpath", bean.cpath);
                j.put("createTime", bean.createTime);
                j.put("curl", bean.curl);
                j.put("endstate", bean.endstate);
                j.put("goodNum", bean.goodNum);
                j.put("id", bean.id);
                j.put("titles", bean.titles);
                j.put("imgPath", bean.imgPath);
                j.put("imgUrl", bean.imgUrl);
                j.put("isTop", bean.isTop);
                j.put("ltype", bean.ltype);
                j.put("num", bean.num);
                j.put("orderId", bean.orderId);
                j.put("redNum", bean.redNum);
                j.put("remark", bean.remark);
                j.put("remark1", bean.remark1);
                j.put("remark2", bean.remark2);
                j.put("remark3", bean.remark3);
                j.put("remark4", bean.remark4);
                j.put("remark5", bean.remark5);
                j.put("remark6", bean.remark6);
                j.put("style", bean.style);
                j.put("states", bean.states);
                j.put("titleId", bean.titleId);
                j.put("uid", bean.uid);
                j.put("uname", bean.uname);
                j.put("shareUrl", bean.shareUrl);
                jsonArray.put(j);
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
        String json = "{\"status\" : 0, \"downTime\" : \"2017-07-12T17:14:25\",\"message\" : \"成功\",list:" + jsonArray.toString() + "}";
        sharedPrefUtil.putString(FaxianActivity.this, ShareFile.USERFILE, ShareFileType, json);
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == 109) {
            try {
                Bundle bundle = data.getExtras();
                if (bundle != null) {
                    int goodnum = bundle.getInt("goodnum", 0);
                    SharedPrefUtil sharedPrefUtil = new SharedPrefUtil(context, ShareFile.USERFILE);
                    String qdtitle = sharedPrefUtil.getString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXTITLE, "");
                    String qdnew = sharedPrefUtil.getString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXNEW, "");
                    String qdpush = sharedPrefUtil.getString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXPUSH, "");
                    String qdme = sharedPrefUtil.getString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXME, "");
                    Gson gson = new Gson();
                    PubicBytitle publiByTitle;
                    if (selectType == 0) {
                        publiByTitle = gson.fromJson(qdtitle, PubicBytitle.class);
                        setList(publiByTitle, publicByTitleList, goodnum, ShareFile.QDFXTITLE);
                    } else if (selectType == 1) {
                        publiByTitle = gson.fromJson(qdnew, PubicBytitle.class);
                        setList(publiByTitle, pubicByNewList, goodnum, ShareFile.QDFXNEW);
                    } else if (selectType == 2) {
                        publiByTitle = gson.fromJson(qdpush, PubicBytitle.class);
                        setList(publiByTitle, pubicByPushList, goodnum, ShareFile.QDFXPUSH);
                    } else if (selectType == 3) {
                        PublicByUid publicByUid = gson.fromJson(qdme, PublicByUid.class);
                        if (publicByUid != null) {
                            if (publicByUid.status == 0) {
                                pubicByUidList.clear();
                                pubicByUidList = publicByUid.page.items;
                                if (pubicByUidList.size() > 0) {
                                    for (PublicByUid.PageBean.ItemsBean bean : pubicByUidList) {
                                        if (bean.titleId.equals(selectNoteTitleid)) {
                                            bean.redNum = bean.redNum + 1;
                                            bean.goodNum = bean.goodNum + goodnum;
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                        JSONArray jsonArray = new JSONArray();
                        for (PublicByUid.PageBean.ItemsBean bean : pubicByUidList) {
                            JSONObject j = new JSONObject();
                            try {
                                j.put("changeTime", bean.changeTime);
                                j.put("contents", bean.contents);
                                j.put("cpath", bean.cpath);
                                j.put("createTime", bean.createTime);
                                j.put("curl", bean.curl);
                                j.put("endstate", bean.endstate);
                                j.put("goodNum", bean.goodNum);
                                j.put("id", bean.id);
                                j.put("titles", bean.titles);
                                j.put("imgPath", bean.imgPath);
                                j.put("imgUrl", bean.imgUrl);
                                j.put("isTop", bean.isTop);
                                j.put("ltype", bean.ltype);
                                j.put("num", bean.num);
                                j.put("orderId", bean.orderId);
                                j.put("redNum", bean.redNum);
                                j.put("remark", bean.remark);
                                j.put("remark1", bean.remark1);
                                j.put("remark2", bean.remark2);
                                j.put("remark3", bean.remark3);
                                j.put("remark4", bean.remark4);
                                j.put("remark5", bean.remark5);
                                j.put("remark6", bean.remark6);
                                j.put("style", bean.style);
                                j.put("states", bean.states);
                                j.put("titleId", bean.titleId);
                                j.put("uid", bean.uid);
                                j.put("uname", bean.uname);
                                j.put("shareUrl", bean.shareUrl);
                                jsonArray.put(j);
                            } catch (JSONException e) {
                                e.printStackTrace();
                            }
                            String json = "{\"status\" : 0, \"downTime\" : \"2017-07-12T17:14:25\",\"message\" : \"成功\",list:" + jsonArray.toString() + "}";
                            sharedPrefUtil.getString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXME, json);
                        }
                    }
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        selectType = -1;
        selectNoteTitleid = "";
        loadlocal();
    }

    String selectNoteTitleid = "";
    int selectType = -1;

    private void loadlocal() {
        SharedPrefUtil sharedPrefUtil = new SharedPrefUtil(context, ShareFile.USERFILE);
        String qdtitle = sharedPrefUtil.getString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXTITLE, "");
        String qdnew = sharedPrefUtil.getString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXNEW, "");
        String qdpush = sharedPrefUtil.getString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXPUSH, "");
        String qdme = sharedPrefUtil.getString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXME, "");


        Gson gson = new Gson();
        PubicBytitle publiByTitle = gson.fromJson(qdtitle, PubicBytitle.class);
        if (publiByTitle != null) {
            if (publiByTitle.status == 0) {
                publicByTitleList.clear();
                publicByTitleList = publiByTitle.list;
                Collections.sort(publicByTitleList, new Comparator<PubicBytitle.ListBean>() {
                    @Override
                    public int compare(PubicBytitle.ListBean lhs,
                                       PubicBytitle.ListBean rhs) {
                        return DateUtil.parseDateTimeSs(lhs.changeTime.replace('T', ' ')).before(DateUtil.parseDateTimeSs(rhs.changeTime.replace('T', ' '))) ? 1 : -1;
                    }
                });
                Viewpager();
            }
        }

        PubicBytitle publiByTitle1 = gson.fromJson(qdnew, PubicBytitle.class);
        if (publiByTitle1 != null) {
            if (publiByTitle1.status == 0) {
                pubicByNewList.clear();
                pubicByNewList = publiByTitle1.list;
                Collections.sort(pubicByNewList, new Comparator<PubicBytitle.ListBean>() {
                    @Override
                    public int compare(PubicBytitle.ListBean lhs,
                                       PubicBytitle.ListBean rhs) {
                        return DateUtil.parseDateTimeSs(lhs.createTime.replace('T', ' ')).before(DateUtil.parseDateTimeSs(rhs.createTime.replace('T', ' '))) ? 1 : -1;
                    }
                });
                send(1);
            }
        }


        PubicBytitle publiByTitle2 = gson.fromJson(qdpush, PubicBytitle.class);
        if (publiByTitle2 != null) {
            if (publiByTitle2.status == 0) {
                pubicByPushList.clear();
                pubicByPushList = publiByTitle2.list;
                Collections.sort(pubicByPushList, new Comparator<PubicBytitle.ListBean>() {
                    @Override
                    public int compare(PubicBytitle.ListBean lhs,
                                       PubicBytitle.ListBean rhs) {
                        return DateUtil.parseDateTimeSs(lhs.changeTime.replace('T', ' ')).before(DateUtil.parseDateTimeSs(rhs.changeTime.replace('T', ' '))) ? 1 : -1;
                    }
                });
                send(2);
            }
        }

        PublicByUid publicByUid = gson.fromJson(qdme, PublicByUid.class);
        if (publicByUid != null) {
            if (publicByUid.status == 0) {
                pubicByUidList.clear();
                pubicByUidList = publicByUid.page.items;
                Collections.sort(pubicByUidList, new Comparator<PublicByUid.PageBean.ItemsBean>() {
                    @Override
                    public int compare(PublicByUid.PageBean.ItemsBean lhs,
                                       PublicByUid.PageBean.ItemsBean rhs) {
                        return DateUtil.parseDateTimeSs(lhs.changeTime.replace('T', ' ')).before(DateUtil.parseDateTimeSs(rhs.changeTime.replace('T', ' '))) ? 1 : -1;
                    }
                });
                send(3);
            }
        }
    }

    private void loaddata() {
        userDetail_findDetailPubicBytitle();
        userDetail_findDetailPubicByNew();
        userDetail_findDetailPubicByPush();
        userDetail_findDetailPubicByUid();
    }


    private void userDetail_findDetailPubicBytitle() {
        HttpUtils httpUtils = new HttpUtils(10000);
        RequestParams params = new RequestParams();
        params.addBodyParameter("nowPage", "1");
        params.addBodyParameter("pageNum", "10");
        httpUtils.send(HttpMethod.POST, URLConstants.清单发现分组标题查询, params, new RequestCallBack<String>() {
            @Override
            public void onSuccess(ResponseInfo<String> responseInfo) {
                if (!TextUtils.isEmpty(responseInfo.result)) {
                    Gson gson = new Gson();
                    PubicBytitle publiByTitle = gson.fromJson(responseInfo.result, PubicBytitle.class);
                    if (publiByTitle.status == 0) {
                        sharedPrefUtil.putString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXTITLE, responseInfo.result);
                        publicByTitleList.clear();
                        publicByTitleList = publiByTitle.list;
                        Collections.sort(publicByTitleList, new Comparator<PubicBytitle.ListBean>() {
                            @Override
                            public int compare(PubicBytitle.ListBean lhs,
                                               PubicBytitle.ListBean rhs) {
                                return DateUtil.parseDateTimeSs(lhs.changeTime.replace('T', ' ')).before(DateUtil.parseDateTimeSs(rhs.changeTime.replace('T', ' '))) ? 1 : -1;
                            }
                        });
                    } else if (publiByTitle.status == 1) {
                        sharedPrefUtil.putString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXTITLE, "");
                        publicByTitleList.clear();
                    }
                    Viewpager();
                }
            }

            @Override
            public void onFailure(HttpException e, String s) {
                mPullRefreshScrollView.onRefreshComplete();
            }
        });

    }


    private void userDetail_findDetailPubicByNew() {
        HttpUtils httpUtils = new HttpUtils(10000);
        RequestParams params = new RequestParams();
        params.addBodyParameter("nowPage", "1");
        params.addBodyParameter("pageNum", "10");
        httpUtils.send(HttpMethod.POST, URLConstants.清单发现分组最新查询, params, new RequestCallBack<String>() {
            @Override
            public void onSuccess(ResponseInfo<String> responseInfo) {
                if (!TextUtils.isEmpty(responseInfo.result)) {
                    Gson gson = new Gson();
                    PubicBytitle publiByTitle = gson.fromJson(responseInfo.result, PubicBytitle.class);
                    if (publiByTitle.status == 0) {
                        sharedPrefUtil.putString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXNEW, responseInfo.result);
                        pubicByNewList.clear();
                        pubicByNewList = publiByTitle.list;
                        Collections.sort(pubicByNewList, new Comparator<PubicBytitle.ListBean>() {
                            @Override
                            public int compare(PubicBytitle.ListBean lhs,
                                               PubicBytitle.ListBean rhs) {
                                return DateUtil.parseDateTimeSs(lhs.createTime.replace('T', ' ')).before(DateUtil.parseDateTimeSs(rhs.createTime.replace('T', ' '))) ? 1 : -1;
                            }
                        });
                    } else if (publiByTitle.status == 1) {
                        sharedPrefUtil.putString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXNEW, "");
                        pubicByNewList.clear();
                    }
                    send(1);
                }
            }

            @Override
            public void onFailure(HttpException e, String s) {
                mPullRefreshScrollView.onRefreshComplete();
            }
        });

    }

    private void userDetail_findDetailPubicByPush() {
        HttpUtils httpUtils = new HttpUtils(10000);
        RequestParams params = new RequestParams();
        params.addBodyParameter("nowPage", "1");
        params.addBodyParameter("pageNum", "10");
        httpUtils.send(HttpMethod.POST, URLConstants.清单发现分组推荐查询, params, new RequestCallBack<String>() {
            @Override
            public void onSuccess(ResponseInfo<String> responseInfo) {
                if (!TextUtils.isEmpty(responseInfo.result)) {
                    Gson gson = new Gson();
                    PubicBytitle publiByTitle = gson.fromJson(responseInfo.result, PubicBytitle.class);
                    if (publiByTitle.status == 0) {
                        sharedPrefUtil.putString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXPUSH, responseInfo.result);
                        pubicByPushList.clear();
                        pubicByPushList = publiByTitle.list;
                        Collections.sort(pubicByPushList, new Comparator<PubicBytitle.ListBean>() {
                            @Override
                            public int compare(PubicBytitle.ListBean lhs,
                                               PubicBytitle.ListBean rhs) {
                                return DateUtil.parseDateTimeSs(lhs.changeTime.replace('T', ' ')).before(DateUtil.parseDateTimeSs(rhs.changeTime.replace('T', ' '))) ? 1 : -1;
                            }
                        });
                    } else if (publiByTitle.status == 1) {
                        sharedPrefUtil.putString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXPUSH, "");
                        pubicByPushList.clear();
                    }
                    send(2);
                }
            }

            @Override
            public void onFailure(HttpException e, String s) {
                mPullRefreshScrollView.onRefreshComplete();
            }
        });

    }

    private void userDetail_findDetailPubicByUid() {
        HttpUtils httpUtils = new HttpUtils(10000);
        RequestParams params = new RequestParams();
        params.addBodyParameter("nowPage", "1");
        params.addBodyParameter("pageNum", "5");
        params.addBodyParameter("uId", userID);
        httpUtils.send(HttpMethod.POST, URLConstants.清单发现分组自己清单查询, params, new RequestCallBack<String>() {
            @Override
            public void onSuccess(ResponseInfo<String> responseInfo) {
                if (!TextUtils.isEmpty(responseInfo.result)) {
                    Gson gson = new Gson();
                    PublicByUid publicByUid = gson.fromJson(responseInfo.result, PublicByUid.class);
                    if (publicByUid.status == 0) {
                        sharedPrefUtil.putString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXME, responseInfo.result);
                        pubicByUidList.clear();
                        pubicByUidList = publicByUid.page.items;
                        Collections.sort(pubicByUidList, new Comparator<PublicByUid.PageBean.ItemsBean>() {
                            @Override
                            public int compare(PublicByUid.PageBean.ItemsBean lhs,
                                               PublicByUid.PageBean.ItemsBean rhs) {
                                return DateUtil.parseDateTimeSs(lhs.changeTime.replace('T', ' ')).before(DateUtil.parseDateTimeSs(rhs.changeTime.replace('T', ' '))) ? 1 : -1;
                            }
                        });
                    } else if (publicByUid.status == 1) {
                        sharedPrefUtil.putString(FaxianActivity.this, ShareFile.USERFILE, ShareFile.QDFXME, "");
                        pubicByUidList.clear();
                    }
                    send(3);
                }
            }

            @Override
            public void onFailure(HttpException e, String s) {
                mPullRefreshScrollView.onRefreshComplete();
            }
        });

    }


    public class ListAdpater extends BaseAdapter {
        List<PubicBytitle.ListBean> list;
        int style = 0;

        public ListAdpater(List<PubicBytitle.ListBean> list, int style) {
            this.list = list;
            this.style = style;
        }

        @Override
        public int getCount() {
            return list == null ? 0 : list.size();
        }

        @Override
        public Object getItem(int position) {
            return null;
        }

        @Override
        public long getItemId(int position) {
            return 0;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            ListAdpater.ViewHolder holder;
            if (convertView == null) {
                holder = new ListAdpater.ViewHolder();
                convertView = LayoutInflater.from(FaxianActivity.this).inflate(R.layout.adapter_fxlist, parent, false);
                holder.title = (TextView) convertView.findViewById(R.id.title);
                holder.name = (TextView) convertView.findViewById(R.id.time);
                holder.other = (TextView) convertView.findViewById(R.id.share);
                convertView.setTag(holder);
            } else {
                holder = (ListAdpater.ViewHolder) convertView.getTag();
            }

            if (list.size() > 0) {
                holder.title.setText(list.get(position).titles);
                holder.name.setText("@" + list.get(position).uname);

                if (style == 0) {
                    Date createTime = DateUtil.parseDateTimeSs(list.get(position).createTime.replace('T', ' '));
                    Date dateToday = DateUtil.parseDateTime(DateUtil.formatDateTimeSs(new Date()));
                    long betweem = (long) (createTime.getTime() - dateToday.getTime()) / 1000;
                    long day = betweem / (24 * 3600);
                    long hour = betweem % (24 * 3600) / 3600;
                    long min = betweem % 3600 / 60;
                    if (Math.abs(day) >= 1) {
                        holder.other.setText(Math.abs(day) + "天前");
                    } else {
                        if (Math.abs(hour) >= 1) {
                            holder.other.setText(Math.abs(hour) + "小时前");
                        } else {
                            holder.other.setText(Math.abs(min) + "分钟前");
                        }
                    }
                } else if (style == 1) {
                    holder.other.setText("浏览" + list.get(position).redNum + "  赞" + list.get(position).goodNum);
                }
            }

            return convertView;
        }

        class ViewHolder {
            TextView title, name, other;
        }
    }


    public class ListAdpater2 extends BaseAdapter {
        List<PublicByUid.PageBean.ItemsBean> list;

        public ListAdpater2(List<PublicByUid.PageBean.ItemsBean> list) {
            this.list = list;
        }

        @Override
        public int getCount() {
            return list == null ? 0 : list.size();
        }

        @Override
        public Object getItem(int position) {
            return null;
        }

        @Override
        public long getItemId(int position) {
            return 0;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            ListAdpater2.ViewHolder holder;
            if (convertView == null) {
                holder = new ListAdpater2.ViewHolder();
                convertView = LayoutInflater.from(FaxianActivity.this).inflate(R.layout.adapter_fxlist, parent, false);
                holder.title = (TextView) convertView.findViewById(R.id.title);
                holder.name = (TextView) convertView.findViewById(R.id.time);
                holder.other = (TextView) convertView.findViewById(R.id.share);
                convertView.setTag(holder);
            } else {
                holder = (ListAdpater2.ViewHolder) convertView.getTag();
            }

            if (list.size() > 0) {
                holder.title.setText(list.get(position).titles);
                holder.name.setText("@" + list.get(position).uname);

                holder.other.setText("浏览" + list.get(position).redNum + "  赞" + list.get(position).goodNum);
            }

            return convertView;
        }

        class ViewHolder {
            TextView title, name, other;
        }
    }


    /**
     * 顶部数据bean
     */
    public class PubicBytitle {

        /**
         * status : 0
         * downTime : 2017-05-31T10:01:37
         * message : 成功
         * list : [{"ltype":1,"orderId":0,"states":2,"style":2,"remark1":null,"uname":"张力川","cpath":"","remark2":null,"goodNum":30,"shareUrl":null,"contents":"#金融分析师(CFA)#2013年\u201c最赚钱的40家公司\u201d前10%全是商业银行。2014年半年报表显示，工商银行、建设银行、农业银行等3家上市公司的净利润均上千亿元。","remark3":null,"isTop":1,"id":1832,"redNum":860,"remark4":null,"uid":52432,"num":"20170213111430315495","endstate":null,"imgUrl":"","remark5":null,"titleId":"42","titles":"未来最赚钱的十五个行业","changeTime":"2017-02-13T23:21:50","remark6":null,"remark":"1","createTime":"2017-02-13T11:14:30","curl":"","imgPath":"20170210/864528.png"}]
         * tDelList : null
         * delList : null
         */

        public int status;
        public String downTime;
        public String message;
        public Object tDelList;
        public Object delList;
        public List<PubicBytitle.ListBean> list;

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getDownTime() {
            return downTime;
        }

        public void setDownTime(String downTime) {
            this.downTime = downTime;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        public Object getTDelList() {
            return tDelList;
        }

        public void setTDelList(Object tDelList) {
            this.tDelList = tDelList;
        }

        public Object getDelList() {
            return delList;
        }

        public void setDelList(Object delList) {
            this.delList = delList;
        }

        public List<PubicBytitle.ListBean> getList() {
            return list;
        }

        public void setList(List<PubicBytitle.ListBean> list) {
            this.list = list;
        }

        public class ListBean {
            /**
             * ltype : 1
             * orderId : 0
             * states : 2
             * style : 2
             * remark1 : null
             * uname : 张力川
             * cpath :
             * remark2 : null
             * goodNum : 30
             * shareUrl : null
             * contents : #金融分析师(CFA)#2013年“最赚钱的40家公司”前10%全是商业银行。2014年半年报表显示，工商银行、建设银行、农业银行等3家上市公司的净利润均上千亿元。
             * remark3 : null
             * isTop : 1
             * id : 1832
             * redNum : 860
             * remark4 : null
             * uid : 52432
             * num : 20170213111430315495
             * endstate : null
             * imgUrl :
             * remark5 : null
             * titleId : 42
             * titles : 未来最赚钱的十五个行业
             * changeTime : 2017-02-13T23:21:50
             * remark6 : null
             * remark : 1
             * createTime : 2017-02-13T11:14:30
             * curl :
             * imgPath : 20170210/864528.png
             */

            public int ltype;
            public int orderId;
            public int states;
            public int style;
            public Object remark1;
            public String uname;
            public String cpath;
            public Object remark2;
            public int goodNum;
            public Object shareUrl;
            public String contents;
            public Object remark3;
            public int isTop;
            public int id;
            public int redNum;
            public Object remark4;
            public int uid;
            public String num;
            public Object endstate;
            public String imgUrl;
            public Object remark5;
            public String titleId;
            public String titles;
            public String changeTime;
            public Object remark6;
            public String remark;
            public String createTime;
            public String curl;
            public String imgPath;

            public int getLtype() {
                return ltype;
            }

            public void setLtype(int ltype) {
                this.ltype = ltype;
            }

            public int getOrderId() {
                return orderId;
            }

            public void setOrderId(int orderId) {
                this.orderId = orderId;
            }

            public int getStates() {
                return states;
            }

            public void setStates(int states) {
                this.states = states;
            }

            public int getStyle() {
                return style;
            }

            public void setStyle(int style) {
                this.style = style;
            }

            public Object getRemark1() {
                return remark1;
            }

            public void setRemark1(Object remark1) {
                this.remark1 = remark1;
            }

            public String getUname() {
                return uname;
            }

            public void setUname(String uname) {
                this.uname = uname;
            }

            public String getCpath() {
                return cpath;
            }

            public void setCpath(String cpath) {
                this.cpath = cpath;
            }

            public Object getRemark2() {
                return remark2;
            }

            public void setRemark2(Object remark2) {
                this.remark2 = remark2;
            }

            public int getGoodNum() {
                return goodNum;
            }

            public void setGoodNum(int goodNum) {
                this.goodNum = goodNum;
            }

            public Object getShareUrl() {
                return shareUrl;
            }

            public void setShareUrl(Object shareUrl) {
                this.shareUrl = shareUrl;
            }

            public String getContents() {
                return contents;
            }

            public void setContents(String contents) {
                this.contents = contents;
            }

            public Object getRemark3() {
                return remark3;
            }

            public void setRemark3(Object remark3) {
                this.remark3 = remark3;
            }

            public int getIsTop() {
                return isTop;
            }

            public void setIsTop(int isTop) {
                this.isTop = isTop;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public int getRedNum() {
                return redNum;
            }

            public void setRedNum(int redNum) {
                this.redNum = redNum;
            }

            public Object getRemark4() {
                return remark4;
            }

            public void setRemark4(Object remark4) {
                this.remark4 = remark4;
            }

            public int getUid() {
                return uid;
            }

            public void setUid(int uid) {
                this.uid = uid;
            }

            public String getNum() {
                return num;
            }

            public void setNum(String num) {
                this.num = num;
            }

            public Object getEndstate() {
                return endstate;
            }

            public void setEndstate(Object endstate) {
                this.endstate = endstate;
            }

            public String getImgUrl() {
                return imgUrl;
            }

            public void setImgUrl(String imgUrl) {
                this.imgUrl = imgUrl;
            }

            public Object getRemark5() {
                return remark5;
            }

            public void setRemark5(Object remark5) {
                this.remark5 = remark5;
            }

            public String getTitleId() {
                return titleId;
            }

            public void setTitleId(String titleId) {
                this.titleId = titleId;
            }

            public String getTitles() {
                return titles;
            }

            public void setTitles(String titles) {
                this.titles = titles;
            }

            public String getChangeTime() {
                return changeTime;
            }

            public void setChangeTime(String changeTime) {
                this.changeTime = changeTime;
            }

            public Object getRemark6() {
                return remark6;
            }

            public void setRemark6(Object remark6) {
                this.remark6 = remark6;
            }

            public String getRemark() {
                return remark;
            }

            public void setRemark(String remark) {
                this.remark = remark;
            }

            public String getCreateTime() {
                return createTime;
            }

            public void setCreateTime(String createTime) {
                this.createTime = createTime;
            }

            public String getCurl() {
                return curl;
            }

            public void setCurl(String curl) {
                this.curl = curl;
            }

            public String getImgPath() {
                return imgPath;
            }

            public void setImgPath(String imgPath) {
                this.imgPath = imgPath;
            }
        }
    }

    public class PublicByUid {


        /**
         * message : 成功
         * status : 0
         * page : {"totalPage":1,"currentPage":0,"items":[{"remark":"1","remark6":null,"states":0,"style":0,"remark1":null,"uname":"布丁奶茶","cpath":"","remark2":null,"goodNum":7,"shareUrl":null,"contents":"工作的时候每两个小时站起来，看看远处的建筑和植物，放松眼睛","remark3":null,"isTop":0,"id":3512,"redNum":84,"remark4":null,"uid":1140656,"num":"20170410205854709612","endstate":null,"imgUrl":"","remark5":null,"titleId":"20170410205427941530","titles":"每日计划","changeTime":"2017-04-10T20:58:54","createTime":"2017-04-10T20:58:54","curl":"","imgPath":"","ltype":1,"orderId":0}],"pageSize":5,"totalCount":1}
         */

        public String message;
        public int status;
        public PublicByUid.PageBean page;

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public PublicByUid.PageBean getPage() {
            return page;
        }

        public void setPage(PublicByUid.PageBean page) {
            this.page = page;
        }

        public class PageBean {
            /**
             * totalPage : 1
             * currentPage : 0
             * items : [{"remark":"1","remark6":null,"states":0,"style":0,"remark1":null,"uname":"布丁奶茶","cpath":"","remark2":null,"goodNum":7,"shareUrl":null,"contents":"工作的时候每两个小时站起来，看看远处的建筑和植物，放松眼睛","remark3":null,"isTop":0,"id":3512,"redNum":84,"remark4":null,"uid":1140656,"num":"20170410205854709612","endstate":null,"imgUrl":"","remark5":null,"titleId":"20170410205427941530","titles":"每日计划","changeTime":"2017-04-10T20:58:54","createTime":"2017-04-10T20:58:54","curl":"","imgPath":"","ltype":1,"orderId":0}]
             * pageSize : 5
             * totalCount : 1
             */

            public int totalPage;
            public int currentPage;
            public int pageSize;
            public int totalCount;
            public List<PublicByUid.PageBean.ItemsBean> items;

            public int getTotalPage() {
                return totalPage;
            }

            public void setTotalPage(int totalPage) {
                this.totalPage = totalPage;
            }

            public int getCurrentPage() {
                return currentPage;
            }

            public void setCurrentPage(int currentPage) {
                this.currentPage = currentPage;
            }

            public int getPageSize() {
                return pageSize;
            }

            public void setPageSize(int pageSize) {
                this.pageSize = pageSize;
            }

            public int getTotalCount() {
                return totalCount;
            }

            public void setTotalCount(int totalCount) {
                this.totalCount = totalCount;
            }

            public List<PublicByUid.PageBean.ItemsBean> getItems() {
                return items;
            }

            public void setItems(List<PublicByUid.PageBean.ItemsBean> items) {
                this.items = items;
            }

            public class ItemsBean {
                /**
                 * remark : 1
                 * remark6 : null
                 * states : 0
                 * style : 0
                 * remark1 : null
                 * uname : 布丁奶茶
                 * cpath :
                 * remark2 : null
                 * goodNum : 7
                 * shareUrl : null
                 * contents : 工作的时候每两个小时站起来，看看远处的建筑和植物，放松眼睛
                 * remark3 : null
                 * isTop : 0
                 * id : 3512
                 * redNum : 84
                 * remark4 : null
                 * uid : 1140656
                 * num : 20170410205854709612
                 * endstate : null
                 * imgUrl :
                 * remark5 : null
                 * titleId : 20170410205427941530
                 * titles : 每日计划
                 * changeTime : 2017-04-10T20:58:54
                 * createTime : 2017-04-10T20:58:54
                 * curl :
                 * imgPath :
                 * ltype : 1
                 * orderId : 0
                 */

                public String remark;
                public Object remark6;
                public int states;
                public int style;
                public Object remark1;
                public String uname;
                public String cpath;
                public Object remark2;
                public int goodNum;
                public Object shareUrl;
                public String contents;
                public Object remark3;
                public int isTop;
                public int id;
                public int redNum;
                public Object remark4;
                public int uid;
                public String num;
                public Object endstate;
                public String imgUrl;
                public Object remark5;
                public String titleId;
                public String titles;
                public String changeTime;
                public String createTime;
                public String curl;
                public String imgPath;
                public int ltype;
                public int orderId;

                public String getRemark() {
                    return remark;
                }

                public void setRemark(String remark) {
                    this.remark = remark;
                }

                public Object getRemark6() {
                    return remark6;
                }

                public void setRemark6(Object remark6) {
                    this.remark6 = remark6;
                }

                public int getStates() {
                    return states;
                }

                public void setStates(int states) {
                    this.states = states;
                }

                public int getStyle() {
                    return style;
                }

                public void setStyle(int style) {
                    this.style = style;
                }

                public Object getRemark1() {
                    return remark1;
                }

                public void setRemark1(Object remark1) {
                    this.remark1 = remark1;
                }

                public String getUname() {
                    return uname;
                }

                public void setUname(String uname) {
                    this.uname = uname;
                }

                public String getCpath() {
                    return cpath;
                }

                public void setCpath(String cpath) {
                    this.cpath = cpath;
                }

                public Object getRemark2() {
                    return remark2;
                }

                public void setRemark2(Object remark2) {
                    this.remark2 = remark2;
                }

                public int getGoodNum() {
                    return goodNum;
                }

                public void setGoodNum(int goodNum) {
                    this.goodNum = goodNum;
                }

                public Object getShareUrl() {
                    return shareUrl;
                }

                public void setShareUrl(Object shareUrl) {
                    this.shareUrl = shareUrl;
                }

                public String getContents() {
                    return contents;
                }

                public void setContents(String contents) {
                    this.contents = contents;
                }

                public Object getRemark3() {
                    return remark3;
                }

                public void setRemark3(Object remark3) {
                    this.remark3 = remark3;
                }

                public int getIsTop() {
                    return isTop;
                }

                public void setIsTop(int isTop) {
                    this.isTop = isTop;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public int getRedNum() {
                    return redNum;
                }

                public void setRedNum(int redNum) {
                    this.redNum = redNum;
                }

                public Object getRemark4() {
                    return remark4;
                }

                public void setRemark4(Object remark4) {
                    this.remark4 = remark4;
                }

                public int getUid() {
                    return uid;
                }

                public void setUid(int uid) {
                    this.uid = uid;
                }

                public String getNum() {
                    return num;
                }

                public void setNum(String num) {
                    this.num = num;
                }

                public Object getEndstate() {
                    return endstate;
                }

                public void setEndstate(Object endstate) {
                    this.endstate = endstate;
                }

                public String getImgUrl() {
                    return imgUrl;
                }

                public void setImgUrl(String imgUrl) {
                    this.imgUrl = imgUrl;
                }

                public Object getRemark5() {
                    return remark5;
                }

                public void setRemark5(Object remark5) {
                    this.remark5 = remark5;
                }

                public String getTitleId() {
                    return titleId;
                }

                public void setTitleId(String titleId) {
                    this.titleId = titleId;
                }

                public String getTitles() {
                    return titles;
                }

                public void setTitles(String titles) {
                    this.titles = titles;
                }

                public String getChangeTime() {
                    return changeTime;
                }

                public void setChangeTime(String changeTime) {
                    this.changeTime = changeTime;
                }

                public String getCreateTime() {
                    return createTime;
                }

                public void setCreateTime(String createTime) {
                    this.createTime = createTime;
                }

                public String getCurl() {
                    return curl;
                }

                public void setCurl(String curl) {
                    this.curl = curl;
                }

                public String getImgPath() {
                    return imgPath;
                }

                public void setImgPath(String imgPath) {
                    this.imgPath = imgPath;
                }

                public int getLtype() {
                    return ltype;
                }

                public void setLtype(int ltype) {
                    this.ltype = ltype;
                }

                public int getOrderId() {
                    return orderId;
                }

                public void setOrderId(int orderId) {
                    this.orderId = orderId;
                }
            }
        }
    }
    @Override
    protected void setAdapter() {

    }
}
